<?php include_once __DIR__.'/../inc/userhead.html';?>
<?php include_once __DIR__.'/../inc/usermenu.html';?>
  <!--右面板-->
  <div class="main_panel">
    <!--头部-->
    <div class="panel_head">
      <ul class="title">
        <li><a href="javascript:;">我的订单</a></li>
      </ul>
      <div class="search">
        <form name="searchForm" action="" method="get">
		    <input name="goodsname" type="text" placeholder="请输入商品名" value="<?=$goodsname?>">
        	<select name='fahuostatus' class='order_sel'>
        	       <option value='' <?php if($fahuostatus == ''):?>selected<?php endif;?>>--商品状态--</option>
                   <option value="未选定" <?php if($fahuostatus == '未选定'):?>selected<?php endif;?>>未选定</option>
                   <option value="已选定" <?php if($fahuostatus == '已选定'):?>selected<?php endif;?>>已选定</option>
                   <option value="已付款" <?php if($fahuostatus == '已付款'):?>selected<?php endif;?>>已付款</option>
                   <option value="已发货" <?php if($fahuostatus == '已发货'):?>selected<?php endif;?>>已发货</option>
                   <option value="已收货" <?php if($fahuostatus == '已收货'):?>selected<?php endif;?>>已收货</option>
                   <option value="已评价" <?php if($fahuostatus == '已评价'):?>selected<?php endif;?>>已评价</option>
                   <option value="已退货" <?php if($fahuostatus == '已退货'):?>selected<?php endif;?>>已退货</option>
        	</select>
	        <div class="search_btn" onclick="document.searchForm.submit()">模糊查询</div>
		</form>
	  </div>
    </div>
    <!--头部-->
    <!--内容-->
    <div class="panel_list">
        <table class="layui-table">
            <colgroup>
              <col>
              <col>
              <col width=100>
              <col width=100>
              <col>
              <col width=100>
              <col>
              <col>
              <col>
            </colgroup>
            <thead>
              <tr>
                <th>商品名称</th>
                <th>数量</th>
                <th>单价</th>
                <th>状态</th>
                <th>地址</th>
                <th>收货人信息</th>
                <th>物流</th>
                <th>备注</th>
                <th>时间</th>
              </tr>
            </thead>
            <tbody>
            <?php foreach($gooodslist as $v):?>
              <tr>
                <td><?=$v['goodsName']?><?=$v['goodsSkuName']?></td>
                <td><?=$v['buyNumber']?></td>
                <td><?=$v['buyPrice']?></td>
                <td><?=$v['workFlow']?></td>
                <td><?=$v['addressMx']?></td>
                <td><?=$v['addressName']?><?=$v['addressTel']?></td>
                <td><?=$v['expressName']?><?=$v['expressNum']?></td>
                <td><?=$v['text']?></td>
                <td><?=$v['time']?></td>
              </tr>
              <?php endforeach;?>
            </tbody>
        </table>

        <?php if($gooodslist):?>
        <!--分页-->
        <div class="plan_pager fr">
          <div class="pageing" id='page'>
          </div>
        </div>
        <!--分页-->
       <?php else:?>
           <p class="buyNull">还没有订单哦！，快去选购吧！</p>
       <?php endif;?>
	</div>
    </div>
    <!--内容-->
  </div>
  <!--右面板-->
</div>

<script>
    function goodsevaluate(id){
        layer.open({
            title: '评价',
            type: 2,
            area: ['50%', '400px'],
            content: '/user/goodsevaluate?id='+id
        });
    }

    layui.use(['laypage'], function(){
        var laypage = layui.laypage;
        //总页数大于页码总数
        laypage.render({
          elem: 'page'
          ,count:<?=$page_count?>  //数据总数
          ,curr:<?=$page?>
          ,limit:10
          ,jump: function(obj,first){
            //首次不执行
            if(!first){
                var o = GetRequest();
                    o.page = obj.curr;
                    o.url  = '/user/collect';
                window.location.href = createUrl(o);
            }
          }
        });
    });
</script>
<?php include_once __DIR__.'/../inc/foot.html';?>
